from Game import SCREEN_HALF_WIDTH, SCREEN_WIDTH, SCREEN_HALF_HEIGHT, SCREEN_HEIGHT


def boundary(x, y):
    view_x = x - SCREEN_HALF_WIDTH
    view_y = y - SCREEN_HALF_HEIGHT
    if view_x < 0:
        view_x = 0

    if view_y < 0:
        view_y = 0

    if view_x > 2800 - SCREEN_WIDTH:
        view_x = 2800 - SCREEN_WIDTH - 1

    if view_y > 1200 - SCREEN_HEIGHT:
        view_y = 1200 - SCREEN_HEIGHT - 1
    return view_x, view_y
